package com.ait.zlmonitor.controller;

import com.ait.zlmonitor.util.RedisUtil;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ZL")
public class ZLmonitorController {
    @Autowired
    private RedisUtil redisUtil;
    @GetMapping("/selectValue")
    public Object getValue(String key){
        System.out.println(key);
        String value = redisUtil.get(key).toString();
//        boolean set = redisUtil.set("fucku", "fucku");
//        String jsonString = JSONObject.toJSONString(value);
        return value;

    }
}
